package com.hqyj.utils;

import org.apache.shiro.crypto.hash.Md2Hash;
import org.apache.shiro.crypto.hash.Md5Hash;
import org.apache.shiro.crypto.hash.SimpleHash;

public class MdUtils {

    public static String changePassword(String salt,String password){
        //创建MD5加密算法对象
        Md5Hash md5Hash = new Md5Hash(salt);
        //加密密码
        SimpleHash pwd = new SimpleHash("MD5", password, md5Hash, 1024);
        return pwd.toString();
    }

}
